'use strict';

module.exports = app => {
  const { INTEGER, DATE } = app.Sequelize;

  const Follow = app.model.define('follow', {
    id: { type: INTEGER, primaryKey: true, autoIncrement: true },
    user_id: {
      type: INTEGER(64),
      allowNull: false,
      comment: '谁的关注列表',
    },
    concerned: {
      type: INTEGER(64),
      allowNull: false,
      comment: '被关注人的id',
    },
    created_at: DATE,
    updated_at: DATE,
  }, {
    sequelize: app.Sequelize,
    modelName: 'follow',
    tableName: 'follow',
    freezeTableName: true
  });

  return Follow;
};
